﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AutoTool
{
  
        [Table("OnlineUsers")]
        public class OnlineUser
        {
            [Key]
            [Column("UserID")]
            [Required]
            [StringLength(36)]
            public string UserID { get; set; }

            [Column("Username")]
            [Required]
            [StringLength(255)]
            public string Username { get; set; }

            [Column("Password")]
            [Required]
            [StringLength(255)]
            public string Password { get; set; }

            [Column("Email")]
            [StringLength(255)]
            public string? Email { get; set; }
        [Column("NickName")]
        public string? NickName { get; set; }

        [Column("LoginTime")]
            [Required]
            public DateTime LoginTime { get; set; }

            [Column("LogoutTime")]
            public DateTime? LogoutTime { get; set; }

            [Column("Status")]
            [Required]
            public int Status { get; set; }

            [Column("IPAddress")]
            [StringLength(50)]
            public string? IPAddress { get; set; }

            [Column("DeviceType")]
            [StringLength(50)]
            public string? DeviceType { get; set; }

            [Column("BrowserInfo")]
            [StringLength(255)]
            public string? BrowserInfo { get; set; }

            [Column("SessionID")]
            [StringLength(255)]
            public string? SessionID { get; set; }

            [Column("Location")]
            [StringLength(255)]
            public string? Location { get; set; }

            [Column("LastActiveTime")]
            public DateTime? LastActiveTime { get; set; }

            [Column("Role")]
            [StringLength(50)]
            public string? Role { get; set; }

            [Column("CreatedAt")]
            [Required]
            public DateTime CreatedAt { get; set; }

            [Column("UpdatedAt")]
            [Required]
            public DateTime UpdatedAt { get; set; }
        
    }
}
